import SearchBox from './search/index.vue'
import TableBox from './table/index.vue'
import GlobalHeader from './header/index.vue'
import InsideHeader from './header/insideHeader.vue'
import GlobalFooter from './footer/index.vue'
import InsideFooter from './footer/insideFooter.vue'
import MyUpload from './upload/index.vue'
import Time from './time/index.vue'
import * as ElementPlusIcons from '@element-plus/icons-vue'

let globalComponents = {
  SearchBox,
  TableBox,
  GlobalHeader,
  InsideHeader,
  GlobalFooter,
  InsideFooter,
  MyUpload,
  Time
}

export default {
  install(app) {
    Object.keys(globalComponents).forEach(key => {
      app.component(key, globalComponents[key])
    })
    for(const [key, component] of Object.entries(ElementPlusIcons)) {
      app.component(key, component)
    }
  }
}